package com.fwtai.web;

import com.fwtai.bean.PageFormData;
import com.fwtai.datasource.DaoHandle;
import org.springframework.stereotype.Repository;

import java.util.List;
import java.util.Map;

/**
 * 欢迎页统计访问数据库
 * @作者 田应平
 * @版本 v1.0
 * @创建时间 2021-07-21 17:49:27
 * @QQ号码 444141300
 * @Email service@yinlz.com
 * @官网 <url>http://www.fwtai.com</url>
*/
@Repository
public class ShareDao{

  private final DaoHandle dao;

  public ShareDao(final DaoHandle dao){
    this.dao = dao;
  }

  public List<Map<String, Object>> getMyShareListData(final PageFormData formData){
    return dao.queryForListMap("share.getMyShareListData",formData);
  }

  public Integer getMyShareListTotal(final PageFormData formData){
    return dao.queryForInteger("share.getMyShareListTotal",formData);
  }

  public Integer getShareTotalAll(final String loginId){
    return dao.queryForInteger("share.getShareTotalAll",loginId);
  }

  public Integer getCurrentDay(final String loginId){
    return dao.queryForInteger("share.getCurrentDay",loginId);
  }

  public Integer getYesterday(final String loginId){
    return dao.queryForInteger("share.getYesterday",loginId);
  }

  public Integer getLast7Day(final String loginId){
    return dao.queryForInteger("share.getLast7Day",loginId);
  }
}